/**
 * Created by ajhin on 1/29/2015.
 */
package com.societyGames.socialFeedExercises
{
import com.societyGames.action.ActionQueue;

public class SocialFeedSimulation
{
  public var applicationText:String;

  private var _render:SocialFeedRender;
  private var _isSuccess:Boolean = false;

  public function get render():SocialFeedRender
  {
    return this._render;
  }

  public function initialize(actionQueue:ActionQueue):void
  {
    this._render = new SocialFeedRender(this, actionQueue);
  }

  public function postToFeed():void
  {
    this._render.postToFeed();
  }

  internal function handlePostToFeedComplete(isSuccess:Boolean):void
  {
    _isSuccess = _isSuccess || isSuccess; //if we succeed once, we're allowed to say success.
  }

  public function get isSuccess():Boolean
  {
    return _isSuccess;
  }
}
}
